package br.com.future.bo;

import java.util.List;

import br.com.future.dao.interfaces.DAOFactory;
import br.com.future.dao.interfaces.ForumDAOI;
import br.com.future.model.Forum;

/**
 * The Class ForumBO.
 * @author Future Tecnology 2012
 * @version 1.1
 */
public class ForumBO {


	/**
	 * Carregar todos forum.
	 *
	 * @return the list
	 */
	public static List<Forum> carregarTodosForum() {
		ForumDAOI forumDAO = DAOFactory.getDAOFactory(DAOFactory.ORACLE)
				.getForumDAO();
		return forumDAO.consultar();
	}
	
	/**
	 * Carregar forum.
	 *
	 * @return the forum
	 */
	public static Forum carregarForum(int codForum) {
		ForumDAOI forumDAO = DAOFactory.getDAOFactory(DAOFactory.ORACLE)
				.getForumDAO();
		return forumDAO.consultar(codForum);
	}
	
	/**
	 * Consultar.
	 *
	 * @param nomeForum the nome forum
	 * @return the list
	 */
	public static List<Forum> consultar(String nomeForum) {
		ForumDAOI forumDAO = DAOFactory.getDAOFactory(DAOFactory.ORACLE)
				.getForumDAO();
		return forumDAO.consultar(nomeForum);
	}
}
